package ai.people.netmon.framework.domain.archives.vo;

import ai.people.netmon.framework.domain.archives.entity.GangGroupArchivesBO;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author zhenglin
 * @date 2022/6/21
 */
@Data
@NoArgsConstructor
public class GangGroupArchivesVO {

    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    /**
     * 姓名
     */
    private List<String> name;
    /**
     * 身份证
     */
    private String idNumber;
    /**
     * 团伙身份
     */
    private String groupIdentity;
    /**
     * 危险程度
     */
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer degreeOfDanger;
    /**
     * 手机号
     */
    private List<String> phoneNumber;
    /**
     * 标签
     */
    private List<String> tags;

    /**
     * 社交信息
     */
    private List<Social> socials;

    public GangGroupArchivesVO(GangGroupArchivesBO bo) {
        this.id = bo.getId();
        this.name = bo.buildNameList();
        this.idNumber = bo.getIdNumber();
        this.phoneNumber = bo.buildPhoneNumberList();
        this.tags = bo.buildTagsList();
        this.socials = bo.buildSocialsList();
        this.groupIdentity = null;
        this.degreeOfDanger = null;
    }

    @Data
    public static class Social {
        /**
         * 平台
         */
        private String socialPlatform;
        /**
         * 账号
         */
        private String username;
    }
}
